import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView,
        redirect: '/user',
        children: [
            {path: '/user', component: () => import('../views/user/UserView.vue')},
            {path: '/school', component: () => import('../views/school/SchoolView.vue')},
            {path: '/blog', component: () => import('../views/blog/BlogView.vue')},
            {path: '/comment', component: () => import('../views/comment/CommentView.vue')},
            {path: '/likes', component: () => import('../views/likes/LikesView.vue')},
            {path: '/information', component: () => import('../views/information/InformationView.vue')}
        ]
    },
    {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router